package chapter5;
import java.util.Scanner;
/****************************************************************
 * Author：icynlau
 * Description: 对元音辅音进行计数
 * Date:2021/4/4
 * ***************************************************************
 */
public class exc5_49 {
	public static void main(String[] args) {
		Scanner input=new Scanner(System.in);
		
		System.out.print("Enter a string: ");
		String s=input.nextLine();
		int sum1=0;//元音
		int sum2=0;
		for(int i=0;i<s.length();i++) {
			if(s.charAt(i)=='a'||s.charAt(i)=='e'||s.charAt(i)=='i'||s.charAt(i)=='o'||s.charAt(i)=='u') {
				sum1++;
			}else if(s.charAt(i)==' ') {
				
			}else {
				sum2++;
			}
			
		}
		
		System.out.print("The number of vowels is "+sum1+"\n"+"The number of consonants is "+sum2+"\n");
		
	}

}
